package com.jeesite.modules.storage.api;


/**
 * 转发访问Controller
 */

import com.jeesite.modules.storage.service.TransVisitService;
import com.jeesite.modules.storage.common.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController(value = "apitransvisit")
@RequestMapping(value = "/api/trans/visit")
public class TransVisitController extends APIController {

    @Autowired
    private TransVisitService transVisitService;

    /**
     * 加入访问
     * @param transMemberId 转发会员Id
     * @param memberId 会员Id
     * @param transActivityId 转发Id
     * @return
     */
    @RequestMapping(method = RequestMethod.POST,value = "join")
    @ResponseBody
    public ServerResponse<String> join(@RequestParam(value = "transMemberId",required = false)String transMemberId, @RequestParam(value = "memberId")String memberId, @RequestParam(value = "transActivityId") String transActivityId){
        return ServerResponse.createBySuccess(200,transVisitService.join(transMemberId, memberId,transActivityId));
    }
}
